#ifndef PROCESSDIALOG_H
#define PROCESSDIALOG_H

#include <QDialog>
#include <QProcess>
#include "missionlist.h"

namespace Ui {
class ProcessDialog;
}

class ProcessDialog : public QDialog
{
  Q_OBJECT

public:
  explicit ProcessDialog(QStringList lines, QWidget *parent = 0);
  ~ProcessDialog();

private:
  Ui::ProcessDialog *ui;
  MissionList missionList;
  QProcess *currentProcess;
  Mission *currentMission;

  bool currentCanceled;
  bool globalCanceled;

  void closeEvent(QCloseEvent *e) override;

public slots:
  void startProcess();
  void handleOutputs();
  void currentFinished(int exitCode);
  void cancelCurrentMission();
  void quitAllMissions();
};

#endif // PROCESSDIALOG_H
